Repository navigation
Ship platform.claude.com in bank/anthropic's allowlist - #113
Merged
Merged
Conversation
Claude Code 2.x makes a startup connectivity check against platform.claude.com and treats failure as fatal, so an entry listing only api.anthropic.com installs cleanly, injects its credential correctly, and still leaves an agent that refuses to start. Allowlist and not `hosts`: the endpoint answers 200 unauthenticated, so it is a destination the agent must reach rather than one the credential should be attached to. The addon compares `flow.request.host` to "api.anthropic.com" exactly, so this cannot widen where a token is sent. PLAYBOOK's "things that belong in the allowlist and not in `hosts`" gains this as a fourth category — the client's own startup checks, which are rarely on the API host and are the one category that does not look like an egress failure when missed. What the user sees names the proxy, so it reads as a credential or TLS problem; the `blocked` line in the trail is what says otherwise. raw.githubusercontent.com, the issue's other candidate, needs nothing: it is already in bank/github/allowlist under OPTIONAL, which is its correct home. Closes #112 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K7ZLAqx3456HP7BAY9gmqA
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #112.
What was wrong
bank/anthropic/allowlistpermitted one destination. Claude Code 2.x callsGET platform.claude.com/v1/oauth/helloat startup and treats failing it asfatal — so installing the entry gave a lab where the credential was injected
correctly and the agent would not start.
Verified before changing anything
platform.claude.comis Anthropic-owned (certCN = platform.claude.com) and/v1/oauth/helloreturns 200 unauthenticated — checked directly. It is areach-only destination, not a credentialed one.
bank/anthropic/proxy/anthropic.pygates onflow.request.host != "api.anthropic.com"— an exact comparison, in both
requestandresponseheaders. Allowlistingthis host therefore cannot cause injection, by construction rather than by
convention. That is what makes "allowlist, not
hosts" the right call and notjust the conservative one.
hosts⊆ allowlist and never the reverse, so the addition isin the permitted direction.
tests/run.sh: 17 suites, all pass.The issue's other candidate
raw.githubusercontent.comneeds no decision — it is already inbank/github/allowlist:29under OPTIONAL, alongsidecodeloadandobjects.githubusercontent.com. That is its correct home: it is GitHub egress,and it is multi-tenant, so it has no business in an Anthropic entry.
PLAYBOOK
"Three things belong in the allowlist that are not in
hosts" becomes four. Thenew category — the client's own startup checks, which are rarely on the API host
— is the one most likely to be missed, because the failure does not present as
an egress failure: the message names the proxy, so it reads as a credential or
TLS problem. The section now says to find these by running the client once and
reading the
blockedlines out of the trail, rather than reasoning from thevendor's API docs, which describe the API and not the client.
No new test
The regression this would guard against is "a vendor's client needs a host the
entry does not list", which is empirical, not structural — the lint derives
everything else from the manifests, and hardcoding a vendor hostname into the
suite would be the first exception to that.
bank/anthropic/allowlistcarriesthe reasoning inline instead, including why editing the file is not enough on
its own (the proxy reads it once at startup, so it needs
up -d --force-recreate proxy).Not affected
examples/claude-codemounts no allowlist — the line is commented out in itscompose.yaml, so it runs permissive.🤖 Generated with Claude Code
https://claude.ai/code/session_01K7ZLAqx3456HP7BAY9gmqA